from rest_framework import serializers
from .models import Area

class AreasInfosSerializer(serializers.ModelSerializer):

    class Meta:
        model = Area
        fields = ['id','name']

class AreasInfosSuperSerializer(serializers.ModelSerializer):
    subs = AreasInfosSerializer(many=True,read_only=True)

    class Meta:
        model = Area
        fields = ['id','name','subs']
